import { ResPage, TransferOrder, Warehouse } from "@/api/interface/index";
import { TRANSFERORDER, WAREHOUSE } from "@/api/config/servicePort";
import http from "@/api";

// 获取调拨单列表
export const getTransferOrderList = (params: TransferOrder.ReqTransferOrderParams) => {
  return http.post<ResPage<TransferOrder.ResTransferOrderList>>(TRANSFERORDER + `/transferOrder/page`, params);
};

// 返回调拨
export const getTransferOrder = (params: TransferOrder.ReqTransferOrderEntity) => {
  return http.post(WAREHOUSE + `/transfer`, params);
};

// 获取库房信息
export const getWarehouseInfo = (params: { warehouseId: number }) => {
  return http.post<Warehouse.WarehouseInfo>(WAREHOUSE + `/get`, params);
};

// 获取库房列表
export const getWarehouseList = (params: Warehouse.ReqWarehouseParams) => {
  return http.post<ResPage<Warehouse.ResWarehouseList>>(WAREHOUSE + `/page`, params);
};
